define(function(require, exports, module) {
  var common = require('common'),
      lang = require('lang');
  module.exports = {
    eq: function(v1,v2,options) {
      if(v1==v2) {
        return options.fn(this);
      } else {
        return options.inverse(this);
      }
    },
    gt: function(v1,v2,options) {
      if(v1>v2) {
        return options.fn(this);
      } else {
        return options.inverse(this);
      }
    },
    empty: function(context, options) {
      context = context || '';
      var isEmpty = context.length===0 ? true : false; //不严谨
      if(isEmpty) {
        return options.fn(this);
      } else {
        return options.inverse(this);
      }
    },
    lang: function(key, domain, options) {
      return lang.get(key, domain);
    },
    button: function(key, options) {
      return lang.button(key);
    },
    global: function(key, options) {
      return lang.get(key);
    },
    country: function(key, options) {
      key = key || '';
      var country = _.findWhere(common.todo.country(), {value: key}) || {};
      return country.text;
    },
    priority: function(key, options) {
      key = key || '';
      var priority = _.findWhere(common.todo.priority(), {value: key}) || {};
      return priority.text;
    }
  }
});